package com.atguigu.service;

import com.atguigu.base.BaseMapper;
import com.atguigu.base.BaseService;
import com.atguigu.entity.UserFollow;
import com.atguigu.entity.vo.UserFollowVo;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;

/**
 * 用户关注接口
 */
public interface UserFollowService extends BaseService<UserFollow> {

    /**
     * 判断当前用户是否已关注该房源信息
     * @param userId
     * @param houseId
     * @return
     */
    UserFollow isFollow( Long userId,Long houseId);

    /**
     * 根据用户id和房源id查询用户的关注信息
     * @param userId
     * @param houseId
     * @return
     */
    UserFollow findUserFollowByUserIdAndHouseId(Long userId, Long houseId);

    /**
     * 查询我的关注的分页信息
     * @param pageNum
     * @param pageSize
     * @param id
     * @return
     */
    PageInfo<UserFollowVo> findUserFollowVoPage(Integer pageNum, Integer pageSize, Long id);


    /**
     * 根据id取消关注
     * @param id
     */
    void cancelFollowById(Long id);
}
